<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
    <!-- 加enctype -->
    <form action="/doUpload" method="POST" role="form" enctype="multipart/form-data">
        <legend>图片上传</legend>
    
        <div class="form-group">
            <label for="">成员姓名</label>
            <input type="text" name="name" class="form-control" id="" placeholder="Input field">
        </div>
        <div class="form-group">
            <label for="">成员爱好</label>
            <input type="text" name="like" class="form-control" id="" placeholder="Input field">
        </div>
        <div class="form-group">
            <label for="">成员年龄</label>
            <input type="text" name="age" class="form-control" id="" placeholder="Input field">
        </div>
        <div class="form-group">
            <label for="">上传图片</label>
            <!-- type改成file -->
            <input type="file" name="file" class="form-control" id="" placeholder="Input field">
        </div>
    
        
    
        <button type="submit" class="btn btn-primary">Submit</button>
    </form>
    
</body>
</html>